// 导入模板封装的axios工具
import request from '@/utils/request'
import log from '@/utils/log'/*log工具*/
export function fetchData (params) {
  // 发起异步的ajax请求，向后端服务器请求数据
    log("group","前端发送请求","GET/_____")
    log("info","URL:","http://localhost:8080/_____")
    // 发起异步的ajax请求，向后端服务器请求数据
    log("info","参数:",params)
  return request({
    // HTTP协议中的请求方法
    method: 'GET',
    // url地址
    url: 'http://localhost:8080/_____',
    // 向服务器发送的参数
    params
  })
}

export function doPost(data) {
  log("group","前端发送请求","POST/_____")
  log("info","URL:","http://localhost:8080/_____")
  log("info","参数:",data)
  return request({
    method: 'POST',
    url: 'http://localhost:8080/_____',
    data
  })
}